﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/MasterPage_List.master" AutoEventWireup="true" CodeFile="CustomerList.aspx.cs" Inherits="Customer_CustomerList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Title" runat="Server">
    客户资料查询
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="Search" runat="Server">
    <span>客户分类：</span>
    <asp:DropDownList ID="ddl_CustomerType" runat="server" CssClass="ht-select"></asp:DropDownList>
    <input class="easyui-searchbox" data-options="prompt:'模糊查询',searcher:doSearch" style="width: 300px" />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Content" runat="Server">

    <div class="ht-panel-grid">
        <input type="hidden" id="hf_grid_order" />
        <table id="grid" class="ht-grid" border="0" style="margin-top: 10px;">
            <thead>
                <tr>
                    <th class="th-order" data-field="CustomerTypeName">客户分类</th>
                    <th class="th-order" data-field="CustomerName">客户名称</th>
                    <th class="th-order" data-field="Gender">性别</th>
                    <th class="th-order" data-field="Country">国籍</th>
                    <th class="th-order" data-field="Email">邮箱</th>
                    <th class="th-order" data-field="Phone">电话</th>
                    <th class="th-order" data-field="CompanyName">公司名</th>
                    <th class="th-order" data-field="Skype">Skype</th>
                    <th class="th-order" data-field="Whatsapp">Whatsapp</th>
                    <th class="th-order" data-field="QQ">QQ</th>
                    <th class="th-order" data-field="Wechat">Wechat</th>
                    <th class="th-order" data-field="Wangwang">阿里旺旺</th>
                    <th class="th-order" data-field="Webside">公司网址</th>
                    <th class="th-order" data-field="Adress">客户地址</th>
                    <th style="width: 180px;">操作</th>
                </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
    </div>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="Pager" runat="Server">
    <div id="pager"></div>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="Footer" runat="Server">
    <!--数据加载-->
    <script type="text/javascript">
        var sQueryString = "";
        var sCustomerTypeId = "";
        var $ddl_CustomerType = $('#<%=ddl_CustomerType.ClientID%>');

        $(function () {
            //加载数据
            refreshGrid();

            $ddl_CustomerType.change(function () {
                sCustomerTypeId = $ddl_CustomerType.val();
                refreshGrid();
            });
        });

        function doSearch(value) {
            sQueryString = value;
            refreshGrid();
        }

        function refreshGrid() {
            $('#grid').BangleGrid({
                pager: '#pager',
                url: 'CustomerList.aspx/GetGridDataHtml',
                query: { QueryString: sQueryString, CustomerTypeId: sCustomerTypeId }
            });
        }
    </script>
</asp:Content>

